<template>
	<view class="setup2">
			<view class="top">
				<textarea class="title" placeholder="好的标题能吸引更多驴友哦" placeholder-style="font-size:14px ; color:#bbb" ></textarea>
				<textarea class="content" v-model="txt" placeholder="请输入文字" placeholder-style="font-size:14px ; color:#bbb" confirm-type="send"></textarea>
	  	</view>
			<view class="bottom">
				<text style="font-size: 14px; color: #797979;">图片上传</text>
				<shangchuan></shangchuan>
				<button class="btn">发布</button>
			</view>
	</view>
</template>

<script>
	import shangchuan from "@/components/shangchuan/shangchuan.vue"
	
	export default {
		data() {
			return {
				txt: ""
			}
		},
		watch: {
			txt(txt) {
				if (txt.indexOf('\n') != -1) { //敲了回车键了
					uni.hideKeyboard()  //收起软键盘
				}
			}
		},
	}
</script>

<style scoped lang="scss">
	.setup2{
		display: flex;
		flex-direction: column;
		
			.top{
				display: flex;
				flex-direction: column;
				background-color: #fff;
				
				.title{
					line-height: 70rpx;
					height: 100rpx;
					padding: 20rpx;
					border-top: 1px solid rgba(0, 0, 0, .1);
				}
				
				.content{
					width: 710rpx;
					height: 500rpx;
					margin: auto;
					border-top: 1px solid rgba(0, 0, 0, .1);
					padding: 20rpx;
				}
			}
			
			.bottom{
				display: flex;
				flex-direction: column;
				background-color: #fff;
				margin-top: 30rpx;
				padding:40rpx;
				
				.btn{
					background-color: #5C78FF;
					color: #fff;
					font-size: 14px;
					font-weight: 800;
				}

			}
	
	
	}

</style>
